﻿@model IEnumerable<KCMS.Models.ShopForm>
@using KCMS.Helpers
<table class="shop-form-table">
    <tr>
        <td>
            &nbsp;
        </td>
        @foreach (var sizeHead in Model.First().Sizes)
        {
            <td>@sizeHead.Title
            </td>
        }
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                <img src="@Url.ContentImageUpload(item.ProductImage.ColorImageFile)" style="height:40px;">
            </td>
            @foreach (var size in item.Sizes)
            {
                <td>
                    @using (Html.BeginForm("","",null,FormMethod.Post,new {@class="shop-form"}))
                    {
                        @Html.Hidden("productId", item.ProductId)
                        @Html.Hidden("productImageId", item.ProductImage.Id)
                        @Html.Hidden("sizeId",size.Id)
                        @Html.TextBox("quantity")
                    }
                </td>
            }
        </tr>
    }
</table>
<div class="add-to-cart-button-container">
<span id="add-to-cart-button" class="add-to-cart-button">В корзину</span>
</div>